home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util4 / abak502.lha / Install / Install_ABackup < prev    next >
Text File  |  1995-09-30  |  16KB  |  395 lines

  1. ;
  2. ; Installer script for ABackup installation
  3. ; $VER: Install_ABackup v36.2 (3.9.95)
  4. ;
  5. ;********* Initialisations ****************************************************
  6. ;
  7. (set MainDir            "")
  8. (set PrefDir            "")
  9. (set DefPrefDir         "SYS:Prefs")
  10. (set SourceDir          "/")
  11. (set XPKSourceDir       (tackon SourceDir "libs/compressors"))
  12. (set TmpFile            (cat "T:RunABPrefs_" (database "total-mem")))
  13. ;
  14. ;********* Setup all the messages *********************************************
  15. ;
  16. (procedure SetupMessages (
  17.   (set DefHelpDir       (tackon "HELP:" @language))
  18.   (set DefCatalogDir    (tackon "LOCALE:Catalogs" @language))
  19.  
  20.   (if (= @language "english")
  21.     (
  22.       (set #InstallWhat         "What do you want to install ?")
  23.       (set #InstallChoice1      "Main program")
  24.       (set #InstallChoice2      "Preferences program")
  25.       (set #InstallChoice3      "Online help")
  26.       (set #InstallChoice4      "XPK libraries")
  27.       (set #InstallChoice5      "")
  28.       (set #SelectMainDir       "Select the directory where to copy the Main program.")
  29.       (set #CopyingMainProg     "Copying the Main program...")
  30.       (set #SelectPrefDir       "Select the directory where to copy the Prefs program.")
  31.       (set #BadPrefDir          "Sorry, the Main program and the Prefs program can't be installed in the same directory !")
  32.       (set #CopyingPrefProg     "Copying the Prefs program...")
  33.       (set #UpdateMainTT1       "Updating the %s tooltype of the Main program...")
  34.       (set #UpdateMainTT2       "Don't forget to update the %s tooltype of the Main program.")
  35.       (set #UpdateMainTTH1      "This will allow the Main program to call the Prefs program.")
  36.       (set #UpdateMainTTH2      "This will allow the Main program to find the help file.")
  37.       (set #UpdatePrefTT1       "Updating the %s tooltype of the Prefs program...")
  38.       (set #UpdatePrefTT2       "Don't forget to update the %s tooltype of the Prefs program.")
  39.       (set #UpdatePrefTTH2      "This will allow the Prefs program to find the help file.")
  40.       (set #SelectHelpDir       "Select the directory where to copy online help.")
  41.       (set #CopyingHelp         "Copying online help...")
  42.       (set #SelectXPKDir        "Select the directory where to copy XPK libraries.")
  43.       (set #CopyingXPK          "Copying XPK libraries...")
  44.       (set #SelectCatalogDir    "Select the directory where to copy the catalog file.")
  45.       (set #CopyingCatalog      "Copying catalog file...")
  46.       (set #RunPrefProg         "Run the Pref program.")
  47.       (set #RunPrefHelp         "This will allow you to setup the ABackup Preferences.")
  48.       (set #Shareware1          "ABackup is a SHAREWARE program !")
  49.       (set #Shareware2          "If you like it and use it, a contribution of US $20 is asked.")
  50.       (set #Shareware3          "Please read the 'Diffusion' section of the documentation, for more details")
  51.     )
  52.   )
  53.   (if (= @language "français")
  54.     (
  55.       (set #InstallWhat         "Que voulez-vous installer ?")
  56.       (set #InstallChoice1      "Programme principal")
  57.       (set #InstallChoice2      "Programme de paramétrage")
  58.       (set #InstallChoice3      "Aide en ligne")
  59.       (set #InstallChoice4      "Bibliothèques XPK")
  60.       (set #InstallChoice5      "Catalogue")
  61.       (set #SelectMainDir       "Indiquez dans quel répertoire installer le programme principal.")
  62.       (set #CopyingMainProg     "Copie du programme principal...")
  63.       (set #SelectPrefDir       "Indiquez dans quel répertoire installer le programme de paramétrage.")
  64.       (set #BadPrefDir          "Désolé, le programme principal et le programme de paramétrage ne peuvent être installés dans le même répertoire !")
  65.       (set #CopyingPrefProg     "Copie du programme de paramétrage...")
  66.       (set #UpdateMainTT1       "Mise à jour du type d'outil %s du programme principal...")
  67.       (set #UpdateMainTT2       "N'oubliez pas de mettre à jour le type d'outil %s du programme principal.")
  68.       (set #UpdateMainTTH1      "Ceci permettra au programme principal d'appeller le programme de paramétrage.")
  69.       (set #UpdateMainTTH2      "Ceci permettra au programme principal de trouver le fichier d'aide.")
  70.       (set #UpdatePrefTT1       "Mise à jour du type d'outil %s du programme de paramétrage...")
  71.       (set #UpdatePrefTT2       "N'oubliez pas de mettre à jour le type d'outil %s du programme de paramétrage.")
  72.       (set #UpdatePrefTTH2      "Ceci permettra au programme de paramétrage de trouver le fichier d'aide.")
  73.       (set #SelectHelpDir       "Indiquez dans quel répertoire installer les fichiers d'aide.")
  74.       (set #CopyingHelp         "Copie des fichiers d'aide...")
  75.       (set #SelectXPKDir        "Indiquez dans quel répertoire installer les bibliothèques XPK.")
  76.       (set #CopyingXPK          "Copie des bibliothèques XPK...")
  77.       (set #SelectCatalogDir    "Indiquez dans quel répertoire installer le fichier catalogue.")
  78.       (set #CopyingCatalog      "Copie du fichier catalogue...")
  79.       (set #RunPrefProg         "Appel du programme de paramétrage.")
  80.       (set #RunPrefHelp         "Ceci vous permettra de paramétrer ABackup.")
  81.       (set #Shareware1          "ABackup est un programme SHAREWARE !")
  82.       (set #Shareware2          "Si vous l'utilisez et l'appréciez, une contribution de 100 FF est demandée.")
  83.       (set #Shareware3          "Reportez-vous au chapitre 'Diffusion' de la documentation, pour plus de détails.")
  84.     )
  85.   )
  86.   (if (= @language "deutsch")
  87.     (
  88.       (set #InstallWhat         "Was möchten Sie installieren ?")
  89.       (set #InstallChoice1      "Hauptprogramm")
  90.       (set #InstallChoice2      "Voreinstellungsprogramm")
  91.       (set #InstallChoice3      "Online Hilfe")
  92.       (set #InstallChoice4      "XPK Libraries")
  93.       (set #InstallChoice5      "Katalog")
  94.       (set #SelectMainDir       "Wählen Sie das Verzeichnis für das Hauptprogramm.")
  95.       (set #CopyingMainProg     "Kopiere das Hauptprogramm...")
  96.       (set #SelectPrefDir       "Wählen Sie das Verzeichnis für das Voreinstellungsprogramm.")
  97.       (set #BadPrefDir          "Sorry, Hauptprogramm und Voreinstellungsprogramm dürfen nicht in das selbe Verzeichnis !")
  98.       (set #CopyingPrefProg     "Kopiere das Voreinstellungsprogramm...")
  99.       (set #UpdateMainTT1       "Aktualisiere das %s Merkmal des Hauptprogramms...")
  100.       (set #UpdateMainTT2       "Vergessen Sie nicht das %s Merkmal des Hauptprogramms zu aktualisieren.")
  101.       (set #UpdateMainTTH1      "Dies erlaubt dem Hauptprogramm den Aufruf des Voreinstellungsprogramms.")
  102.       (set #UpdateMainTTH2      "Dies erlaubt dem Hauptprogramm die Hilfe-Datei zu finden.")
  103.       (set #UpdatePrefTT1       "Aktualisiere das %s Merkmal des Voreinstellungsprogramms...")
  104.       (set #UpdatePrefTT2       "Vergessen Sie nicht das %s Merkmal des Voreinstellungsprogramms zu aktualisieren.")
  105.       (set #UpdatePrefTTH2      "Dies erlaubt dem Voreinstellungsprogramm die Hilfe-Datei zu finden.")
  106.       (set #SelectHelpDir       "Wählen Sie das Verzeichnis für die Online-Hilfe.")
  107.       (set #CopyingHelp         "Kopiere die Datei für die Online-Hilfe...")
  108.       (set #SelectXPKDir        "Wählen Sie das Verzeichnis für die XPK Libraries.")
  109.       (set #CopyingXPK          "Kopiere die XPK Libraries...")
  110.       (set #SelectCatalogDir    "Wählen Sie das Verzeichnis für die Katalogdatei.")
  111.       (set #CopyingCatalog      "Kopiere die Katalogdatei...")
  112.       (set #RunPrefProg         "Starte das Voreinstellungsprogramm.")
  113.       (set #RunPrefHelp         "Dies erlaubt Ihnen die Voreinstellungen von ABackup zu ändern.")
  114.       (set #Shareware1          "ABackup ist SHAREWARE !")
  115.       (set #Shareware2          "Falls ihnen das Programm gefällt und Sie es regelmäßig benutzen, entrichten Sie bitte eine Gebühr von DM 30.")
  116.       (set #Shareware3          "Schlagen Sie bitte im Kapitel 'Diffusion' (Vertrieb) des Handbuchs nach, um mehr Informationen zu erhalten.")
  117.     )
  118.   )
  119.   (if (= @language "italiano")
  120.     (
  121.       (set #InstallWhat         "Che cosa vuoi installare ?")
  122.       (set #InstallChoice1      "Programma Principale")
  123.       (set #InstallChoice2      "Programma Preferenze")
  124.       (set #InstallChoice3      "Aiuto in-linea")
  125.       (set #InstallChoice4      "Librerie XPK")
  126.       (set #InstallChoice5      "Catalogo Italiano")
  127.       (set #SelectMainDir       "Seleziona la directory dove copiare il Programma Principale.")
  128.       (set #CopyingMainProg     "Sto copiando il Programma Principale...")
  129.       (set #SelectPrefDir       "Seleziona la directory dove copiare il Programma Preferenze.")
  130.       (set #BadPrefDir          "Spiacente, ma il programma Principale e quello delle Preferenze non possono essere installati nella stessa directory !")
  131.       (set #CopyingPrefProg     "Sto copiando il programma per le Preferenze...")
  132.       (set #UpdateMainTT1       "Sto aggiornando il tooltype %s del programma Principale...")
  133.       (set #UpdateMainTT2       "Non dimenticare di aggiornare il tooltype %s del programma Principale.")
  134.       (set #UpdateMainTTH1      "Questo permetterà al programma Principale di chiamare il programma Preferenze.")
  135.       (set #UpdateMainTTH2      "Questo permetterà al programma Principale di trovare il file di aiuto.")
  136.       (set #UpdatePrefTT1       "Sto aggiornando il tooltype %s del programma Preferenze...")
  137.       (set #UpdatePrefTT2       "Non dimenticare di aggiornare il tooltype %s del programma Preferenze.")
  138.       (set #UpdatePrefTTH2      "Questo permetterà al programma Preferenze di trovare il file di aiuto.")
  139.       (set #SelectHelpDir       "Seleziona la directory dove copiare l'aiuto in-linea.")
  140.       (set #CopyingHelp         "Sto copiando aiuto in-linea...")
  141.       (set #SelectXPKDir        "Seleziona la directory dove copiare librerie XPK.")
  142.       (set #CopyingXPK          "Sto copiando librerie XPK...")
  143.       (set #SelectCatalogDir    "Seleziona la directory dove copiare il file catalogo.")
  144.       (set #CopyingCatalog      "Sto copiando il file catalogo...")
  145.       (set #RunPrefProg         "Eseguo il programma per le Preferenze.")
  146.       (set #RunPrefHelp         "Questo ti permette di impostare le Preferenze di ABackup.")
  147.       (set #Shareware1          "ABackup è un programma SHAREWARE !")
  148.       (set #Shareware2          "Se ti piace e lo usi, è richiesto un contributo di US $20.")
  149.       (set #Shareware3          "Per favore, leggi la sezione 'Diffusione' della documentazione, per ulteriori dettagli")
  150.     )
  151.   )
  152. ))
  153. ;
  154. ;********* Install the main program *******************************************
  155. ;
  156. (procedure InstallMainProg (
  157.   (set MainDir
  158.     (askdir
  159.       (prompt #SelectMainDir)
  160.       (help @askdir-help)
  161.       (default "SYS:Utilities")
  162.     )
  163.   )
  164.   (copyfiles
  165.     (prompt #CopyingMainprog)
  166.     (help @copyfiles-help)
  167.     (source (tackon SourceDir "ABackup/ABackup"))
  168.     (dest MainDir)
  169.     (infos)
  170.   )
  171. ))
  172. ;
  173. ;********* Install the Prefs program *******************************************
  174. ;
  175. (procedure InstallPrefProg (
  176.   (set PrefDir MainDir)
  177.   (until (NOT (= PrefDir MainDir)) (
  178.     (set PrefDir
  179.       (askdir
  180.     (prompt #SelectPrefDir)
  181.     (help @askdir-help)
  182.     (default DefPrefDir)
  183.       )
  184.     )
  185.     (if (= PrefDir MainDir) (message #BadPrefDir))
  186.   ))
  187.   (copyfiles
  188.     (prompt #CopyingPrefprog)
  189.     (help @copyfiles-help)
  190.     (source (tackon SourceDir "Prefs/ABackup"))
  191.     (dest PrefDir)
  192.     (infos)
  193.   )
  194.   (if (NOT (= PrefDir DefPrefDir))
  195.     (if (BITAND ToInstall 1)
  196.       (tooltype
  197.     (prompt (#UpdateMainTT1 "PREFSPATH"))
  198.     (help #UpdateMainTTH1)
  199.     (dest (tackon MainDir "ABackup"))
  200.     (settooltype "PREFSPATH" PrefDir)
  201.     (confirm)
  202.       )
  203.       (message (cat (#UpdateMainTT2 "PREFSPATH") #UpdateMainTTH1))
  204.     )
  205.   )
  206. ))
  207. ;
  208. ;********* Install the help files **********************************************
  209. ;
  210. (procedure InstallHelp (
  211.   (set HelpDir
  212.     (askdir
  213.       (prompt #SelectHelpDir)
  214.       (help @askdir-help)
  215.       (default DefHelpDir)
  216.     )
  217.   )
  218.  
  219.   (if (= @language "français")
  220.       (set SrcHelpDir "français")
  221.       (set SrcHelpDir "english")
  222.   )
  223.  
  224.   (copyfiles
  225.     (prompt #CopyingHelp)
  226.     (help @copyfiles-help)
  227.     (source (tackon (tackon SourceDir (tackon "ABackup/Docs/" SrcHelpDir)) "ABackup.guide"))
  228.     (dest HelpDir)
  229.   )
  230.   (if (NOT (= HelpDir DefHelpDir))
  231.     (if (BITAND ToInstall 1)
  232.       (tooltype
  233.     (prompt (#UpdateMainTT1 "HELPPPATH"))
  234.     (help #UpdateMainTTH2)
  235.     (dest (tackon MainDir "ABackup"))
  236.     (settooltype "HELPPATH" HelpDir)
  237.     (confirm)
  238.       )
  239.       (message (cat (#UpdateMainTT2 "HELPPPATH") #UpdateMainTTH2))
  240.     )
  241.   )
  242.  
  243.   (copyfiles
  244.     (prompt #CopyingHelp)
  245.     (help @copyfiles-help)
  246.     (source (tackon (tackon SourceDir (tackon "Prefs/Docs/" SrcHelpDir)) "ABackupPrefs.guide"))
  247.     (dest HelpDir)
  248.   )
  249.   (if (NOT (= HelpDir DefHelpDir))
  250.     (if (BITAND ToInstall 2)
  251.       (tooltype
  252.     (prompt (#UpdatePrefTT1 "HELPPPATH"))
  253.     (help #UpdatePrefTTH2)
  254.     (dest (tackon PrefDir "ABackup"))
  255.     (settooltype "HELPPATH" HelpDir)
  256.     (confirm)
  257.       )
  258.       (message (cat (#UpdatePrefTT2 "HELPPPATH") #UpdatePrefTTH2))
  259.     )
  260.   )
  261. ))
  262. ;
  263. ;********* Install XPK library ************************************************
  264. ;
  265. (procedure InstallXPK (
  266.   (set XPKDir
  267.     (askdir
  268.       (prompt #SelectXPKDir)
  269.       (help @askdir-help)
  270.       (default "LIBS:")
  271.     )
  272.   )
  273.   (copylib
  274.     (prompt #CopyingXPK)
  275.     (help @copylib-help)
  276.     (source (tackon SourceDir "libs/xpkmaster.library"))
  277.     (dest XPKDir)
  278.   )
  279.   (foreach XPKSourceDir "#?.library"
  280.     (copylib
  281.       (prompt #CopyingXPK)
  282.       (help @copylib-help)
  283.       (source (tackon XPKSourceDir @each-name))
  284.       (dest (tackon XPKDir "compressors"))
  285.     )
  286.   )
  287. ))
  288. ;
  289. ;********* Install the catalogs ***********************************************
  290. ;
  291. (procedure InstallCatalog (
  292.   (set CatalogDir
  293.     (askdir
  294.       (prompt #SelectCatalogDir)
  295.       (help @askdir-help)
  296.       (default DefCatalogDir)
  297.     )
  298.   )
  299.   (copyfiles
  300.     (prompt #CopyingCatalog)
  301.     (help @copyfiles-help)
  302.     (source (tackon (tackon (tackon SourceDir "ABackup/Catalogs") @language) "abackup.catalog"))
  303.     (dest CatalogDir)
  304.   )
  305.   (copyfiles
  306.     (prompt #CopyingCatalog)
  307.     (help @copyfiles-help)
  308.     (source (tackon (tackon (tackon SourceDir "Prefs/Catalogs") @language) "abackupprefs.catalog"))
  309.     (dest CatalogDir)
  310.   )
  311. ))
  312. ;
  313. ;********* Start of the installation program **********************************
  314. ;
  315. (complete 0)
  316. (user 2)
  317. (set #InstallWhat "")
  318. ;
  319. ;********* Setup messages and check language
  320. ;
  321. (SetupMessages)
  322. (if (= #InstallWhat "")
  323.   (
  324.     (set langnum
  325.       (askchoice
  326.     (prompt "Which language do you speak ?")
  327.     (help @askoptions-help)
  328.     (choices "deutsch" "english" "français" "italiano")
  329.       )
  330.     )
  331.     (set @language (select langnum "deutsch" "english" "français" "italiano"))
  332.     (SetupMessages)
  333.   )
  334. )
  335. ;
  336. ;********* Displays the welcome message
  337. ;
  338. (user 0)
  339. (welcome)
  340. ;
  341. ;********* Ask which part is to be installed
  342. ;
  343. (set ToInstall
  344.   (askoptions
  345.     (prompt #InstallWhat)
  346.     (help @askoptions-help)
  347.     (if (= #InstallChoice5 "")
  348.     (choices #InstallChoice1 #InstallChoice2 #InstallChoice3 #InstallChoice4)
  349.     (choices #InstallChoice1 #InstallChoice2 #InstallChoice3 #InstallChoice4 #InstallChoice5)
  350.     )
  351.   )
  352. )
  353. ;
  354. ;******** Install each part
  355. ;
  356. (complete 15)
  357. (if (BITAND ToInstall  1) (InstallMainProg))
  358. (complete 30)
  359. (if (BITAND ToInstall  2) (InstallPrefProg))
  360. (complete 45)
  361. (if (BITAND ToInstall  4) (InstallHelp))
  362. (complete 60)
  363. (if (BITAND ToInstall  8) (InstallXPK))
  364. (complete 75)
  365. (if (BITAND ToInstall 16) (InstallCatalog))
  366. (complete 90)
  367. ;
  368. ;******** Call the Pref program
  369. ;
  370. (if (BITAND ToInstall  2)
  371.   (
  372.     (textfile
  373.       (dest TmpFile)
  374.       (append (cat "Run <NIL: >NIL: " (tackon PrefDir "ABackup")))
  375.     )
  376.     (execute
  377.       (TmpFile)
  378.       (prompt #RunPrefProg)
  379.       (help #RunPrefHelp)
  380.       (confirm)
  381.     )
  382.     (delete TmpFile)
  383.   )
  384. )
  385. ;
  386. ;******** End
  387. ;
  388. (if (= MainDir "")
  389.   (set @default-dest PrefDir)
  390.   (set @default-dest MainDir)
  391. )
  392. (message (cat #Shareware1 "\n" #Shareware2 "\n" #Shareware3))
  393. (complete 100)
  394. ;
  395.